<%@ page import="com.goal98.team.Constants" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="mobile"/>
    <title>${teamInstance}<g:message code="info.pendingTask" default="Pending Task"/></title>
</head>
<body>

        <div class="highlight">${teamInstance}<g:message code="info.pendingTask" default="Pending Task"/></div>
        <g:if test="${flash.message}">
            <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}"/></div>
        </g:if>

        <g:if test="${upcomingActivity}">

            <div class="dialog">

                <table>
                    <tbody>
                    <tr class="prop">
                        <td colspan="2"><h1><g:message code="info.pendingTask.upcoming.activity" default="Upcoming Activity"/></h1></td>

                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="activity.activityTime" default="Activity Time"/>:</td>

                        <td valign="top" class="value"><g:formatDate date="${upcomingActivity?.activityTime}" format="yyyy-MM-dd HH:mm"/></td>

                    </tr>

                    <tr class="prop">
                        <td valign="top" class="name"><g:message code="activity.venue" default="Venue"/>:</td>

                        <td valign="top" class="value">
                            ${upcomingActivity?.venue?.encodeAsHTML()}
                        </td>

                    </tr>

                    </tbody>
                </table>

            </div>

        </g:if>

        <div style="clear:both;"></div>

        <g:ifAnyGranted role="${Constants.ROLE_TEAM_ADMIN}">

            <div class="dialog">

                <table>
                    <tbody>
                    <tr>
                        <td><h1><g:message code="info.pendingTask.member" default="Pending member"/></h1></td>
                    </tr>
                    <g:each var="member" in="${memberList}">
                        <tr>
                            <td>
                                <g:link controller="player" action="account" id="${member.id}">
                                    ${member}:${member.account ? member.account?.balance : 0}
                                </g:link>
                            </td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>

            </div>
            <div style="clear:both;"></div>
        </g:ifAnyGranted>

</body>
</html>
